package com.edu.service;

import com.edu.dao.AnnouncementMapper;
import com.edu.pojo.Announcement;

import java.util.List;

public class AnnouncementServiceImpl implements AnnouncementService{
    private AnnouncementMapper announcementMapper;
    public void setAnnouncementMapper(com.edu.dao.AnnouncementMapper announcementMapper)
    {
        this.announcementMapper=announcementMapper;
    }
    public int addAnnouncement(Announcement announcement){
        return announcementMapper.addAnnoun(announcement);
    }

    public int deleteAnnouncementById(int id){
        return announcementMapper.deleteAnnounById(id);
    }

    public int updateAnnouncement(Announcement announcement){
        return announcementMapper.updateAnnoun(announcement);
    }

    public List<Announcement> queryAnnouncement(){
        return announcementMapper.queryAllAnnoun();
    }
}
